import SwiftUI

// SellListRow
// 转一转商品详情交易信息行

struct SellDetailListRow: View {
    var trade: Trade
    
    var body: some View {
        VStack(alignment: .leading, spacing: 8) {
            Text(trade.realStudentNumber + trade.realName)
                .font(.title3)
            
            Text("期望价格：" + String(format: "¥%.2f", Double(trade.wantPrice) / 100))
                .foregroundColor(.orange)
            
            Text("联系方式：" + trade.contact)
                .foregroundColor(.accent)

            Text("期望地点：" + trade.location)
                
            Text("留言：" + trade.comment)
            
            Text(trade.timestamp)
                .font(.footnote)
                .foregroundColor(.secondary)
        }
        
        Divider()
    }
}

#Preview {
    SellDetailListRow(trade: DefaultTrade)
}
